/*csd*/define(function(require,exports,module){"use strict";var a=require("./event");var h=require("./utils");exports.events=a.use(exports);window.events=a.use(window);var e=function(){var l=d();var i=b.length-2;var k=b.length-1;var j=(b[i]==l);if(j){b.pop();}else{if(b[k]!=l){b.push(l);}}exports.events.call("change",{uri:l,isBack:j,length:b.length});};var b=[d()];exports.history=function(){return b;};window.__history=b;function d(){if(location.hash){return location.hash.split("#")[1];}return null;}exports.getUri=d;function g(j,i){if(j==d()){return;}if(j&&j!=""){location.hash="#"+j;}else{location.hash=null;}}exports.setUri=g;function c(){var i=b.length-2;if(b[i]){g(b[i]);}}exports.back=c;function f(){b=[d()];}exports.reset=f;window.events.on("hashchange",e);});